package huawei.js2025;

import java.util.Map;
import java.util.Scanner;

/**
 * 几何平均值最大子数
 */
public class Question19 {

    // 几何平均值转化为算术平均值（分别求数组的每一项的e对数）
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // numbers大小
        int L = sc.nextInt(); // 子数组的最小长度

        double[] numberArr = new double[N];
        double[] proSums = new double[N + 1];

        for (int i = 0; i < N; i++) {
            numberArr[i] = Math.log(sc.nextDouble());
            proSums[i + 1] = proSums[i] + numberArr[i];
        }

        int bestStart = 0;
        int bestLen = L;
        double maxAvgLog = Double.NEGATIVE_INFINITY;

        for (int i = 0; i <= N - L; i++) {
            for (int j = i + L; j <= N; j++) {
                double avg = (proSums[j] - proSums[i]) / (j - i);

                if (avg > maxAvgLog + 1e-10) {
                    maxAvgLog = avg;
                    bestStart = i;
                    bestLen = j - i;
                } else if (Math.abs(avg - maxAvgLog) <= 1e-10 && (j  - i) < bestLen) {
                    bestStart = i;
                    bestLen = j - i;
                }
            }
        }

        System.out.println(bestStart + " " + bestLen);
    }
}
